const express=require("express")
const r=express.Router()
const pool=require("../pool.js")
r.get("/v1/search/:uname",(req,res)=>{
	var sql="select * from pizza_user where uname=?"
	pool.query(sql,[req.params.uname],(err,result)=>{
		if(err)throw err;
		if(result.length>0){
			res.send("1")
		}else{
			res.send("0")
		}
	})
})

module.exports=r